﻿#pragma once

#ifndef QCEFDOWNFAVICON_H
#define QCEFDOWNFAVICON_H

#include <QtCore>

#include "QCefDebug.h"
#include "QCefHeader.h"
#include "QCefClient.h"

//////////////////////////////////////////////////////////////////////////
//QCefDownFavicon
class QCefDownFavicon : public CefDownloadImageCallback
{
public:
    QCefDownFavicon(QCefClient::DelegatePtr delegate);
    QCefDownFavicon(CefRefPtr<QCefDelegate> gate);

public:
    void OnDownloadImageFinished(const CefString & image_url,
                                int http_status_code,
                                CefRefPtr<CefImage> image) override;

private:
    QCefClient::DelegatePtr m_delegate;
    CefRefPtr<QCefDelegate> m_gate;

private:
    IMPLEMENT_REFCOUNTING(QCefDownFavicon);
    DISALLOW_COPY_AND_ASSIGN(QCefDownFavicon);
};


#endif // QCEFDOWNFAVICON_H
